//
// Created by ASUS on 2025/3/26/星期三.
//
/*
 *       =1, n=1
 * mu[n] =0, n含有平方因子
 *       =(-1)^k, k是质因子个数
 */



#include <iostream>
#include <vector>
using namespace std;

vector<int> get_mobius(int n) {
	vector<int> mu(n + 1, 0);
	vector<bool> is_prime(n + 1, true);
	vector<int> primes;

	mu[1] = 1;  // μ(1) = 1
	for (int i = 2; i <= n; ++i) {
		if (is_prime[i]) {
			primes.push_back(i);
			mu[i] = -1;  // 质数的μ值为-1
		}
		for (int p : primes) {
			if (i * p > n) break;
			is_prime[i * p] = false;
			if (i % p == 0) {
				mu[i * p] = 0;  // 含平方因子，μ=0
				break;
			} else {
				mu[i * p] = mu[i] * mu[p];  // 积性函数性质
			}
		}
	}
	return mu;
}

int main() {
	int n;
	cin >> n;
	vector<int> mu = get_mobius(n);

	cout << "μ(1~" << n << "): ";
	for (int i = 1; i <= n; ++i) {
		cout << mu[i] << " ";
	}
	return 0;
}